<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>TODO supply a title</title>
    </head>
    <body>
        <h:form>
            <h:dataTable value="#{user.listaUsers}" var="item" border="1">
                <h:column>
                    <f:facet name="header">
                        <h:outputLabel value="Id" />
                    </f:facet>
                    <h:outputLabel value="#{item.id}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputLabel value="Nome" />
                    </f:facet>
                    <h:outputLabel value="#{item.nome}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputLabel value="Login" />
                    </f:facet>
                    <h:outputLabel value="#{item.login}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputLabel value="Senha" />
                    </f:facet>
                    <h:outputLabel value="#{item.senha}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputLabel value="AÇÃO" />
                    </f:facet>
                    <h:commandLink value="Deletar" action="#{user.deletarUser}">
                        <f:setPropertyActionListener target="#{user.userSelecionado}"
                                                     value="#{item}" />
                    </h:commandLink>
                    <h:outputLabel value=" - "></h:outputLabel>
                    <h:commandLink value="Editar" action="editarUser">
                        <f:setPropertyActionListener target="#{user.userSelecionado}"
                                                     value="#{item}" />
                    </h:commandLink>
                </h:column>
            </h:dataTable>
        </h:form>
    </body>
</html>
